<template>
    <div>
        <van-field v-model="content" :label="label" :type="type" :placeholder="placeholder" :rule="rule"/>
    </div>
</template>

<script>
    export default {
        props: ['label', 'type', 'placeholder', 'rule'],
        data() {
            return {content: ''}
        },
        methods: {
            inputRule() {

                this.$emit('inputChange', this.content)

            }
        },
        watch: {
            content: function () {
                this.inputRule()
            }
        }
    }
</script>

<style scoped>

</style>